#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include "registerdialog.h"
#include <QDialog>
#include <resetpassworddialog.h>
#include <global.h>
#include "mytitlebar.h"

QT_BEGIN_NAMESPACE
namespace Ui { class LoginDialog; }
QT_END_NAMESPACE

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    LoginDialog(QWidget *parent = nullptr);
    ~LoginDialog();

private:
    void initTitleBar();//初始化自定义标题栏
    Ui::LoginDialog *ui;
    RegisterDialog* _register_dlg;
    ResetPasswordDialog* _reset_dlg;

signals:
    void sig_login_finish(QJsonObject userData);

private slots:
    void slot_login_mod_finish(ReqId id, QByteArray res, ErrorCodes err);
    void slot_checkbox_state_changed(int state);//密码框显示,0为密文显示，0以上为明文显示
    void on_radioButton_clicked(bool checked);

    void on_register_btn_clicked();//注册用户信号

    void on_reset_btn_clicked();

    void on_login_clicked();

protected:
    MyTitleBar* m_titleBar;

public slots:
    void onButtonCloseClicked();


};
#endif // LOGINDIALOG_H
